import { Column, Entity, Index, PrimaryGeneratedColumn } from "typeorm";

@Index("idx_is_del", ["isDel"], {})
@Entity("rrz_forms", { schema: "rrzcms" })
export class RrzForms {
  @PrimaryGeneratedColumn({
    type: "int",
    name: "id",
    comment: "表id",
    unsigned: true,
  })
  id: number;

  @Column("varchar", { name: "title", comment: "表单名称", length: 255 })
  title: string;

  @Column("longtext", { name: "config", nullable: true, comment: "表单配置" })
  config: string | null;

  @Column("int", {
    name: "add_time",
    nullable: true,
    comment: "创建时间",
    unsigned: true,
  })
  addTime: number | null;

  @Column("tinyint", {
    name: "is_del",
    nullable: true,
    comment: "删除(0=否，1=是)",
    unsigned: true,
    default: () => "'0'",
  })
  isDel: number | null;
}
